-- GENERATED SPELL FOR [Angered Nether-wraith] --


function spell0_17870(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(39337,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17870', 1000, 1)
end

function spell1_17870(pUnit, Event) --@Shadow Blast,n/a--
pUnit:FullCastSpellOnTarget(38205,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17870', 6000, 1)
end

function Sorts_17870(pUnit, Event)
local choix_sorts_17870 = math.random(0, 1)
if choix_sorts_17870 == 0 then
pUnit:RegisterEvent('spell0_17870', 1, 1)
end
if choix_sorts_17870 == 1 then
pUnit:RegisterEvent('spell1_17870', 1, 1)
end
end

function mob17870_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17870', math.random(1500, 3000), 1)
end

function mob17870_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17870_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17870_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17870, 1, 'mob17870_Action')
RegisterUnitEvent(17870, 2, 'mob17870_Leave')
RegisterUnitEvent(17870, 3, 'mob17870_Kill')
RegisterUnitEvent(17870, 4, 'mob17870_Die')
